﻿<local:baseParametersPage x:Class="USMC.Net.synchronizationPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:USMC.Net"
      mc:Ignorable="d" 
	Title="synchronizationPage">

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TextBlock Grid.Column="0" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Stretch">Инвертировать</TextBlock>
        <CheckBox Grid.Column="1" Grid.Row="1" Name="invertChB1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        <CheckBox Grid.Column="2" Grid.Row="1" Name="invertChB2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        <Label Grid.Column="1" Grid.Row="0" HorizontalAlignment="Center">X</Label>
        <Label Grid.Column="2" Grid.Row="0" HorizontalAlignment="Center">Y</Label>
        <Label HorizontalAlignment="Center" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="3">Выходная синхронизация</Label>
        <ToggleButton Grid.Column="1" Grid.Row="4" Name="enableSyncOutTB1" HorizontalAlignment="Center">
            <ToggleButton.Style>
                <Style TargetType="{x:Type ToggleButton}">
                    <Setter Property="Content" Value="Отключена"/>
                    <Style.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Content" Value="Включена"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ToggleButton.Style>
        </ToggleButton>
        <ToggleButton Grid.Column="2" Grid.Row="4" Name="enableSyncOutTB2">
            <ToggleButton.Style>
                <Style TargetType="{x:Type ToggleButton}">
                    <Setter Property="Content" Value="Отключена"/>
                    <Style.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Content" Value="Включена"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ToggleButton.Style>
        </ToggleButton>
        <TextBlock Grid.Column="0" Grid.Row="5" TextWrapping="Wrap" VerticalAlignment="Stretch">Шагов между импульсами</TextBlock>
        <TextBlock Grid.Column="0" Grid.Row="6" TextWrapping="Wrap" VerticalAlignment="Stretch">Длительность импульса в шагах</TextBlock>
        <TextBlock Grid.Column="0" Grid.Row="7" TextWrapping="Wrap" VerticalAlignment="Stretch">Сбрасывать счетчик импульсов перед стартом</TextBlock>
        <TextBox Grid.Column="1" Grid.Row="5" Name="stepsPerPulseOutTB1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="60"></TextBox>
        <TextBox Grid.Column="2" Grid.Row="5" Name="stepsPerPulseOutTB2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="60"></TextBox>
        <TextBox Grid.Column="1" Grid.Row="5" Name="OutDuarationTB1" HorizontalAlignment="Center" VerticalAlignment="Bottom" Width="60" Margin="14,0,14,1" Grid.RowSpan="2"></TextBox>
        <TextBox Grid.Column="2" Grid.Row="6" Name="OutDuarationTB2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="60"></TextBox>
        <CheckBox Grid.Column="1" Grid.Row="7" Name="resetOutCounterChB1" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        <CheckBox Grid.Column="2" Grid.Row="7" Name="resetOutCounterChB2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        <Button Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="8" HorizontalAlignment="Center" Name="resetSyncoutCounterButton" Click="resetSyncoutCounterButton_Click">Сбросить счетчики</Button>
        <Label HorizontalAlignment="Center" Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="3"  Visibility="Collapsed">Входная синхронизация</Label>
        <ToggleButton Grid.Column="1" Grid.Row="10" Name="enableSyncInTB1" Visibility="Collapsed" HorizontalAlignment="Center">
            <ToggleButton.Style>
                <Style TargetType="{x:Type ToggleButton}">
                    <Setter Property="Content" Value="Отключена"/>
                    <Style.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Content" Value="Включена"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ToggleButton.Style>
        </ToggleButton>
        <ToggleButton Grid.Column="2" Grid.Row="10" Name="enableSyncInTB2"  Visibility="Collapsed">
            <ToggleButton.Style>
                <Style TargetType="{x:Type ToggleButton}">
                    <Setter Property="Content" Value="Отключена"/>
                    <Style.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Content" Value="Включена"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </ToggleButton.Style>
        </ToggleButton>
    </Grid>
</local:baseParametersPage>
